<%
# Copyright (C) 2015 - present Instructure, Inc.
#
# This file is part of Canvas.
#
# Canvas is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# Canvas is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
# details.
#
# You should have received a copy of the GNU Affero General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
%>

<% if aacs.present? %>
  <div class="ic-Login__sso">
    <ul class="ic-Login__sso-list">
      <% aacs.each do |aac| %>
        <% only_one = aacs.size < 2 %>
        <li class="ic-Login__sso-list__item">
          <a href="/login/<%= aac.auth_type %>"
             class="Button Button--primary <%= only_one ? 'ic-Login__sso-button--has-text ' : '' %>ic-Login__sso-button ic-Login__sso-button--<%= aac.auth_type %>">
              <%= render partial: "shared/auth_type_icon",
                         locals: {
                           auth_type: aac.auth_type,
                           sr_message: only_one ? nil : t("Login with %{provider}", provider: aac.class.display_name),
                           with_login_text: only_one
                         } %>
          </a>

        </li>
      <% end %>
    </ul>
  </div>
<% end %>
